// pages/zhuren/zhuren.js
import * as echarts from '../../ec-canvas/echarts' // 这个是自己实际的目录

var chart1;
let app=getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        active: 0,
        ec1: {
            onInit: function (canvas, width, height) {
                chart1 = echarts.init(canvas, null, {
                    width: width,
                    height: height
                })
                canvas.setChart(chart1);
                chart1.setOption(getOption1());
                // that.loadData();
                return chart1;
            }
        },
        ec2: {
            onInit: function (canvas, width, height) {
                chart1 = echarts.init(canvas, null, {
                    width: width,
                    height: height
                })
                canvas.setChart(chart1);
                chart1.setOption(getOption2());
                // that.loadData();
                return chart1;
            }
        },
        ec3: {
            onInit: function (canvas, width, height) {
                chart1 = echarts.init(canvas, null, {
                    width: width,
                    height: height
                })
                canvas.setChart(chart1);
                chart1.setOption(getOption3());
                // that.loadData();
                return chart1;
            }
        },
        list: {
            user: '彭彬',
            zhiwu: '项目经理',
            fangxiang: '短视频运营'
        },
        option2: [{
                text: '当期',
                value: 'a'
            },
            {
                text: '2108',
                value: 'b'
            },
            {
                text: '2107',
                value: 'c'
            },
        ],
        value2: 'a',
    },
    onChange(e) {
        // console.log("e:", e);
        this.setData({
            active: e.detail.index
        })
    },
    onClickLeft() {
        wx.showToast({
            title: '点击返回',
            icon: 'none'
        });
    },
    onClickRight() {
        wx.showToast({
            title: '点击按钮',
            icon: 'none'
        });
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        app.http.jyzhiDaoShouYe({"id":8,"type":"quannian"}).then(res=>{
            console.log("res:",res);
            if(res.data.code == 200){
                this.setData({
                    dataList:res.data.data
                })
                console.log(this.data.dataList);
            }
          })
     
    },

    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {

    },

})